package com.ai.manager.edu.cms.info.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ai.dao.edu.cms.info.InfoPushObjectMapper;
import com.ai.manager.edu.cms.info.InfoPushObjectManager;
import com.ai.model.edu.cms.info.InfoPushObject;
import com.ai.model.edu.cms.info.dto.InfoPushObjectDTO;
import com.ai.model.edu.cms.info.vo.InfoPushObjectVO;

@Component("infoPushObjectManager")
public class InfoPushObjectManagerImpl implements InfoPushObjectManager {
    @Resource
    private InfoPushObjectMapper infoPushObjectMapper;


    /**
     * 请求ID查询
     */
    public List<InfoPushObjectVO> findInfoPushObjectByAppId(Long appId) {
    	return infoPushObjectMapper.findInfoPushObjectByAppId(appId);
    }
    
    /**
     * 批量查询 资讯 对象
     */
    public List<InfoPushObjectVO> findInfoPushObjectByAppIds(List<Long> appIds) {
    	Map<String,Object> map = new HashMap<String,Object>();
    	map.put("appIds", appIds);
    	return infoPushObjectMapper.findInfoPushObjectByAppIds(map);
    }

	@Override
	public void insertInfoPushObject(InfoPushObject infoObject) {
		infoPushObjectMapper.insertInfoPushObject(infoObject);
	}

	@Override
	public void updateInfoPushObject(InfoPushObject infoObject) {
		infoPushObjectMapper.updateInfoPushObject(infoObject);
	}

	@Override
	public void deleteInfoPushObjectByPushId(InfoPushObjectDTO infoPushObjectDTO) {
		infoPushObjectMapper.deleteInfoPushObjectByPushId(infoPushObjectDTO);
		
	}

	@Override
	public void batchInsertInfoPushObject(List<InfoPushObject> objectList) {
		infoPushObjectMapper.batchInsertInfoPushObject(objectList);
	}

}